package cn.tedu.tmall.front.mall.service.impl;

import cn.tedu.tmall.common.PageDataVO;
import cn.tedu.tmall.front.mall.dao.repository.IGoodRepository;
import cn.tedu.tmall.front.mall.pojo.vo.GoodItemVO;
import cn.tedu.tmall.front.mall.service.IGoodService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class GoodService implements IGoodService {
    @Autowired
    private IGoodRepository goodRepository;
    @Override
    public PageDataVO<GoodItemVO> listGoodByCategoryId(Long categoryId, Integer pageNum, Integer pageSize) {
        PageDataVO<GoodItemVO> listGoodPO = goodRepository.listGoodByCategoryId( categoryId,  pageNum, pageSize);
                return listGoodPO;
    }
}
